package org.bioversityinternational.mgbms.model.domain;

// Generated 14 sept. 2011 15:11:58 by Hibernate Tools 3.4.0.CR1

import javax.persistence.AttributeOverride;
import javax.persistence.AttributeOverrides;
import javax.persistence.Column;
import javax.persistence.EmbeddedId;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.Table;

/**
 * AssOrderShipment generated by hbm2java
 */
@Entity
@Table(name = "AssOrderShipment", schema = "dbo", catalog = "imgbms")
public class AssOrderShipment implements java.io.Serializable {

	private AssOrderShipmentId id;
	private Shipment shipment;

	public AssOrderShipment() {
	}

	public AssOrderShipment(AssOrderShipmentId id, Shipment shipment) {
		this.id = id;
		this.shipment = shipment;
	}

	@EmbeddedId
	@AttributeOverrides({
			@AttributeOverride(name = "orderId", column = @Column(name = "orderId", nullable = false)),
			@AttributeOverride(name = "shipmentId", column = @Column(name = "shipmentId", nullable = false)) })
	public AssOrderShipmentId getId() {
		return this.id;
	}

	public void setId(AssOrderShipmentId id) {
		this.id = id;
	}

	@ManyToOne(fetch = FetchType.LAZY)
	@JoinColumn(name = "shipmentId", nullable = false, insertable = false, updatable = false)
	public Shipment getShipment() {
		return this.shipment;
	}

	public void setShipment(Shipment shipment) {
		this.shipment = shipment;
	}

}
